#ifndef EDITPROFILEDIALOG_H
#define EDITPROFILEDIALOG_H

#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QFileDialog>
#include <QMessageBox>
#include <QPixmap>
#include <QTextEdit>
#include "component/item/AvatarLabel.h"

class EditProfileDialog : public QDialog
{
    Q_OBJECT
public:
    explicit EditProfileDialog(QWidget *parent = nullptr);

signals:
    void profileUpdated(const QPixmap &avatar, const QString &username, const QString &signature); // 当用户点击保存时发出信号

private slots:
    void onSaveButtonClicked();

private:
    QPixmap updatedAvatar;
    QLineEdit *usernameEdit;
    QTextEdit *signatureEdit;
    AvatarLabel *avatarPreview;
    QPushButton *changeAvatarButton;
    QPushButton *saveButton;
};

#endif // EDITPROFILEDIALOG_H
